package com.lysh.aliHttp.common.exception;

/**
 * @author liyishan
 * @date 2023/5/5 09:56
 * @apiNote
 */

public class InconsistentException extends RuntimeException{
    private static final long serialVersionUID = 2140587868503948665L;
    private Long clientChecksum;
    private Long serverChecksum;
    private String requestId;

    public InconsistentException(Long clientChecksum, Long serverChecksum, String requestId) {
        this.clientChecksum = clientChecksum;
        this.serverChecksum = serverChecksum;
        this.requestId = requestId;
    }

    public Long getClientChecksum() {
        return this.clientChecksum;
    }

    public void setClientChecksum(Long clientChecksum) {
        this.clientChecksum = clientChecksum;
    }

    public Long getServerChecksum() {
        return this.serverChecksum;
    }

    public void setServerChecksum(Long serverChecksum) {
        this.serverChecksum = serverChecksum;
    }

    public String getRequestId() {
        return this.requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getMessage() {
        return "InconsistentException \n[RequestId]: " + this.getRequestId() + "\n[ClientChecksum]: " + this.getClientChecksum() + "\n[ServerChecksum]: " + this.getServerChecksum();
    }
}
